import React, { Component } from 'react';

import { BrowserRouter as Router,Switch,Route,Redirect } from "react-router-dom"
import Login from "./pages/Login"
import Main from "./pages/Main"

export default class App extends Component {
  render(){
    return (
      <div>
        <Router>
          <Switch>
            <Route path={"/login"} component={Login}></Route>
            <Route path={"/main"} component={Main}></Route>
            <Redirect path={'/'} to={"/login"}></Redirect>
          </Switch>
        </Router>
      </div>
    )
  }
}

